<input type='hidden' id='goodsId' class='j-ipt' value='{$object["goodsId"]}'/>
<table class='wst-form'>
  <tr>
     <th width='150'>商品名称<font color='red'>*</font>：</th>
     <td width='550'>
        <textarea style='height:50px;width:400px' class='j-ipt' id='goodsName' maxLength='150' data-rule='商品名称:required;'>{$object["goodsName"]}</textarea>
     </td>
     <td rowspan='6'>
        <div id='goodsImgBox' style='margin-bottom:5px;'>
        <img src='__RESOURCE_PATH__/{if $object["goodsImg"]!=''}{$object["goodsImg"]}{else}{:WSTConf('CONF.goodsLogo')}{/if}' id='preview' width='150' height='150'>
        </div>
        <div id='goodsImgPicker'>请上传商品图片</div><span id='uploadMsg'></span>
        <input type='hidden' id='goodsImg' class='j-ipt' data-target='#msg_goodsImg' value='{if $object["goodsId"]>0}{$object["goodsImg"]}{/if}' data-rule="商品图片: required;"/>
        <span class='msg-box' id='msg_goodsImg'></span>
     </td>
  </tr>
  <tr>
     <th>商品类型<font color='red'>*</font>：</th>
     <td>
       <select id='goodsType' class='j-ipt' onchange="changeGoodsType(this.value)" {if $object["goodsId"]>0}disabled{/if}>
         <option value='0' {if($object["goodsType"]==0)}selected{/if}>实物商品</option>
         <option value='1' {if($object["goodsType"]==1)}selected{/if}>虚拟商品</option>
       </select>
     </td>
  </tr>
  <tr>
     <th>商品编号<font color='red'>*</font>：</th>
     <td><input type='text' class='j-ipt' id='goodsSn' value='{$object["goodsSn"]}' maxLength='20' data-rule='商品编号:required;'/></td>
  </tr>
  <tr>
  <th width='150'>商品货号<font color='red'>*</font>：</th>
     <td width='300'>
        <input type='text' class='j-ipt' id='productNo' value='{$object["productNo"]}' maxLength='20' data-rule='商品货号:required;'/>
     </td>
  </tr>
  <tr>
     <th>市场价格<font color='red'>*</font>：</th>
     <td><input type='text' class='j-ipt' id='marketPrice' value='{$object["marketPrice"]}' maxLength='10' data-rule='市场价格:required;price' data-rule-price="[/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/, '价格必须大于0']" onblur="javascript:WST.limitDecimal(this,2)" onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
  </tr>
  <tr>
     <th>店铺价格<font color='red'>*</font>：</th>
     <td><input type='text' class='j-ipt' id='shopPrice' value='{$object["shopPrice"]}' maxLength='10' data-rule='店铺价格:required;price' data-rule-price="[/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/, '价格必须大于0']" onblur="javascript:WST.limitDecimal(this,2)" onkeypress="return WST.isNumberdoteKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
  </tr>
  <tr id='goodsStockTr' {if($object["goodsType"]==1)}style='display:none'{/if}>
     <th>商品库存<font color='red'>*</font>：</th>
     <td><input type='text' class='j-ipt' id='goodsStock' value='{$object["goodsStock"]}' maxLength='10' data-rule='商品库存:required;integer[+0]' onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
  </tr>
  <tr>
     <th>预警库存<font color='red'>*</font>：</th>
     <td colspan='2'><input type='text' class='j-ipt' id='warnStock' value='{$object["warnStock"]}' maxLength='10' data-rule='预警库存:required;integer[+0]' onkeypress="return WST.isNumberKey(event)" onkeyup="javascript:WST.isChinese(this,1)"/></td>
  </tr>
  <tr>
     <th>商品单位<font color='red'>*</font>：</th>
     <td colspan='2'><input type='text' class='j-ipt' id='goodsUnit' value='{$object["goodsUnit"]}' maxLength='10' data-rule='商品单位:required;'/></td>
  </tr>
  <tr>
     <th>SEO关键字：</th>
     <td colspan='2'><input type='text' class='j-ipt' id='goodsSeoKeywords' maxLength='100' value='{$object["goodsSeoKeywords"]}' style='width:70%'/></td>
  </tr>
  <tr>
     <th>商品促销信息：</th>
     <td colspan='2'><textarea class='j-ipt' id='goodsTips' maxLength='100' style='width:500px;height:50px'>{$object["goodsTips"]}</textarea></td>
  </tr>
  {:hook('shopDocumentShopEditGoods',['goodsId'=>$object["goodsId"]])}
  <tr>
     <th>商品状态<font color='red'>*</font>：</th>
     <td colspan='2' class="layui-form">
        <label><input type='radio' name='isSale' id="isSale-1" class='j-ipt' value='1' {if $object['isSale']==1}checked{/if} title='上架'/></label>
        <label><input type='radio' name='isSale' id="isSale-0" class='j-ipt' value='0' {if $object['isSale']==0}checked{/if} title='下架'/></label>
     </td>
  </tr>
  <tr>
     <th>商品属性：</th>
     <td colspan='2' class='layui-form'>
	        <input id="isRecom" name='isRecom' lay-skin="primary" class="j-ipt" {if $object['isRecom']==1}checked{/if} value="1" type="checkbox" title='推荐'/>
	        <input id="isBest" name="isBest" lay-skin="primary" class="j-ipt" {if $object['isBest']==1}checked{/if} value="1" type="checkbox" title='精品'/>
	        <input id="isNew" name="isNew" lay-skin="primary" class="j-ipt" {if $object['isNew']==1}checked{/if} value="1" type="checkbox" title='新品'/>
	        <input id="isHot" name="isHot" lay-skin="primary" class="j-ipt" {if $object['isHot']==1}checked{/if} value="1" type="checkbox" title='热销'/>
     </td>
  </tr>
  <tr>
     <th>是否包邮：</th>
     <td colspan='2' class="layui-form">
        <label><input type='radio' name='isFreeShipping' id="isFreeShipping-1" class='j-ipt' value='1' {if $object['isFreeShipping']==1}checked{/if} title='包邮'/></label>
        <label><input type='radio' name='isFreeShipping' id="isFreeShipping-0" class='j-ipt' value='0' {if $object['isFreeShipping']==0}checked{/if} title='不包邮'/></label>
     </td>
  </tr>
  <tr>
     <th>商城分类<font color='red'>*</font>：</th>
     <td colspan='2'>
         <select id="cat_0" class='ipt j-goodsCats' level="0" onchange="WST.ITGoodsCats({id:'cat_0',val:this.value,isRequire:true,className:'j-goodsCats',afterFunc:'lastGoodsCatCallback'});getBrands('brandId',this.value)">
	      	<option value="">-请选择-</option>
	      	{volist name=":WSTShopApplyGoodsCats(0)" id="vo"}
	        <option value="{$vo['catId']}">{$vo['catName']}</option>
	        {/volist}
	     </select>
     </td>
  </tr>
  <tr>
     <th>本店分类：</th>
     <td colspan='2'>
         <select id="shopCatId1" class='j-ipt' onchange="getShopsCats('shopCatId2',this.value,'');">
            <option value="">-请选择-</option>
            {volist name=":WSTShopCats(0)" id="vo"}
            <option value="{$vo['catId']}" {if $object['shopCatId1']==$vo['catId']}selected{/if}>{$vo['catName']}</option>
            {/volist}
         </select>
         <select id='shopCatId2' class='j-ipt'>
             <option value=''>请选择</option>
         </select>
     </td>
  </tr>
  <tr>
     <th>品牌：</th>
     <td colspan='2'>
         <select id="brandId" class='j-ipt'>
            <option value="0">-请选择-</option>
         </select>
     </td>
  </tr>
  <tr>
     <th>商品描述<font color='red'>*</font>：</th>
     <td colspan='2'>
         <textarea rows="2" cols="60" id='goodsDesc' class='j-ipt' name='goodsDesc' data-rule='商品描述:required;'>{$object['goodsDesc']}</textarea>
     </td>
  </tr>
  <tr>
     <td colspan='3' align='center' style='text-align:center;padding-top:10px;'>
        <button type='button' class="btn btn-primary btn-mright" onclick='javascript:save({$p})'><i class="fa fa-check"></i>保&nbsp;存</button>
        <button type='button' class="btn" onclick="toBack({$p},'{$src}')"><i class="fa fa-angle-double-left"></i>返&nbsp;回</button>
     </td>
  </tr>
</table>